package com.microstation.entity.base;

import lombok.Data;

import java.io.Serializable;

@Data
public class BaseDO implements Serializable {
    //页码
    private Integer page = new Integer(0);
    //每页记录数
    private Integer rows = new Integer(5);
    //分页开始行数
    private Integer start = new Integer(0);

    public void setPage(Integer page) {
        this.page = page;
        if (page != null && page.intValue() > 0) {
            this.start = (page - 1) * rows;
        }
    }
}
